﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TtfLibrary.CommonStructures
{
    [TtfStructure]
    public class TtfTableDictionary
    {
        public const int ContentLength = 4 + 4 + 4 + 4;

        public UInt32 Tag;
        public UInt32 CheckSum;
        public UInt32 Offset;
        public UInt32 Length;

        public string TagAsString
        {
            get { return Encoding.ASCII.GetString(BitConverter.GetBytes(Tag).Reverse().ToArray()).Trim(); }
            set { Tag = BitConverter.ToUInt32(Encoding.ASCII.GetBytes(value).Reverse().ToArray(), 0); }
        }
    }
}
